package com.example.provider;

import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import java.util.concurrent.CountDownLatch;

/**
 * @author zhouyp
 * @program tp-monitor
 * @description
 * @create 2020-07-13
 */
public class Provider {

	public static void main(String[] args) throws InterruptedException {
		AnnotationConfigApplicationContext context =
				new AnnotationConfigApplicationContext(ProviderConfiguration.class);
		context.start();
		System.out.println("dubbo service started");
		new CountDownLatch(1).await();
	}

	@Configuration
	@EnableDubbo(scanBasePackages = "com.example.service.impl")
	@PropertySource("classpath:/spring/dubbo-provider.properties")
	static public class ProviderConfiguration {
	}

}
